import * as sqlite_opt from "@/utils/sqliteUtil.js";

const tCodeIspRstTable = "t_code_isp_rst";
const tCodeDpsTypeTable = "t_code_dps_type";


export const requireCodeIspRstData = () => {
	return new Promise((resolve, reject) => {
		let sqlStr = `SELECT * `;
		sqlStr += `from ` + tCodeIspRstTable + ` order by cod_ordr ` ;

		sqlite_opt.selectSql(sqlStr,
			(e) => {
				resolve(e);
			},
			(e) => {
				console.log(e)
				reject(e);
			});
	})
}

export const requireCodeDpsTypeData = () => {
	return new Promise((resolve, reject) => {
		let sqlStr = `SELECT * `;
		sqlStr += `from ` + tCodeDpsTypeTable + ` order by cod_ordr ` ;

		sqlite_opt.selectSql(sqlStr,
			(e) => {
				resolve(e);
			},
			(e) => {
				console.log(e)
				reject(e);
			});
	})
}